#include"common.h"
#include"Point.h"

Point::Point(int x, int y) :x(x), y(y){}

Point::Point(const Point& point)
{
	this->x = point.x;
	this->y = point.y;
}

int& Point::getX()
{
	return x;
}

int& Point::getY()
{
	return y;
}

void Point::Move(int speed, Dir dir)
{
	switch (dir)
	{
	case Point::left:
		this->x -= speed;
		break;
	case Point::right:
		this->x += speed;
		break;
	case Point::up:
		this->y -= speed;
		break;
	case Point::down:
		this->y += speed;
		break;
	}
}